using UnityEngine;

public class AiTestButton : MonoBehaviour
{
	public UILabel label;

	public int playerDefinitionIndex { get; protected set; }

	public void Awake()
	{
		if (MatchParameters.InitParameters.aiDefinition != null)
		{
			playerDefinitionIndex = MatchParameters.InitParameters.aiDefinition.index;
		}
		label.text = playerDefinitionIndex.ToString();
	}

	public void OnClick()
	{
		playerDefinitionIndex = (playerDefinitionIndex + 1) % ScriptableObjectSingleton<AiPlayerDefinitions>.instance.players.Count;
		label.text = playerDefinitionIndex.ToString();
	}
}
